<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="<%=request.getContextPath()%>/css/Default.css"
	rel="stylesheet" type="text/css" />
	<link href="<%=request.getContextPath()%>/css/ui.jqgrid.css"
	rel="stylesheet" type="text/css"></link>
<link href="<%=request.getContextPath()%>/css/redmond/jquery-ui-1.8.14.custom.css"
	rel="stylesheet" type="text/css"></link>
<link href="<%=request.getContextPath()%>/css/Dialog.css"
	rel="stylesheet" type="text/css"></link>
<script src="<%=request.getContextPath()%>/scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
<script src="<%=request.getContextPath()%>/scripts/HRM.js" type="text/javascript"></script>
<script src="<%=request.getContextPath()%>/scripts/MyDataGrid.js" type="text/javascript"></script>
<script
	src="<%=request.getContextPath()%>/scripts/jqgrid/i18n/grid.locale-cn.js"
	type="text/javascript"></script>
<script
	src="<%=request.getContextPath()%>/scripts/jqgrid/jquery.jqGrid.src.js"
	type="text/javascript"></script>
<script
	src="<%=request.getContextPath()%>/scripts/jquery-ui-1.8.14.min.js"
	type="text/javascript"></script>
<script
	src="<%=request.getContextPath()%>/scripts/Dialog.js"
	type="text/javascript"></script>
<script
	src="<%=request.getContextPath()%>/scripts/DataGrid.js"
	type="text/javascript"></script>
<script type="text/javascript">
	function doSearch() {
		var name = "";
		if ($("#SearchUserName").val() != "请输入用户名或真实姓名") {
			name = $("#SearchUserName").val().trim();
		}
	}

	document.onkeydown = function(event) {
		if (event.keyCode == 13) {
			var ele = event.srcElement || event.target;
			if (ele.id == 'SearchUserName' || ele.id == 'Submitbutton') {
				doSearch();
			}
		}
	};

	function delKeyWord() {
		if ($("#SearchUserName").val() == "请输入用户名或真实姓名") {
			$("#SearchUserName").val('');
		}
	}
</script>
<script>
$().ready(function() {//加载用户列表
	
	dataGridID='roleUserDataGrid';
	var path='<%=request.getContextPath()%>/role.do?method=getUsersNotRoleId&id=<%=request.getParameter("id")%>';
	var params={
		'path':path,
		'colNames':[ 'ID', '用户名', '真实姓名', '创建人', '创建时间' ],
		'colModel':[ {
			name : 'id',
			index : 'id',
			width : 10
			//百分比
			}, {
				name : 'userName',
				index : 'userName',
				width : 15
			}, {
				name : 'employeeName',
				index : 'employeeName',
				width : 15
			}, {
				name : 'createUserName',
				index : 'createUserName',
				width : 30
			}, {
				name : 'createDate',
				index : 'createDate',
				width : 30
		} ]
	};
	initJQGrid(params,dataGridID);
	$("#"+dataGridID).jqGrid('setGridParam', {
		url : path
	}).trigger("reloadGrid");//重新设置url重新加载数据
	});
</script>
</head>
<body>
	<table width="660" align="center" cellpadding="2" cellspacing="0">
		<tr>
			<td>
				<div style="float: right; white-space: nowrap;">
					<input name="SearchUserName" type="text" id="SearchUserName"
						value="请输入用户名或真实姓名" onFocus="delKeyWord();" style="width: 150px">
					<input type="button" name="Submitbutton" id="Submitbutton"
						value="查询" onClick="doSearch()">
				</div>
			</td>
		</tr>
		<tr>
			<td id="dataGridTd"
				style="padding-top: 0px; padding-left: 6px; padding-right: 6px; padding-bottom: 8px;">
				<table id="roleUserDataGrid" width=100% class="dataGridTable"></table>
				<div id="pager"></div>
			</td>
		</tr>

	</table>
</body>
</html>
